﻿using System;

namespace BaseSyntax.Initializer
{
	public class ClassInit:ITest
	{
		
		private class MyClass
		{
			public string GetA { get; set; }
		
			public int GetB { get; set; }

			public string str = "";

			public int i1 = 2;

			public MyClass()
			{
				
			}

			public MyClass(int i)
			{
				i1 = i;
			}
		}

		public void Test()
		{
			MyClass myClass = new MyClass()
			{
				str = "sss",
				GetA = "a",
				GetB = 2,
			};

			MyClass myClass1 = new MyClass(1)
			{
				str = "sss",
				GetA = "a",
				GetB = 2,
				i1 = 3,
			};

			Console.WriteLine(myClass1.i1);
		}
	}
	
}